/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pooproj.repositorio;

import java.util.ArrayList;
import pooproj.basica.LocMidia;
import pooproj.erro.ConexaoException;
import pooproj.erro.ConsultaException;

/**
 *
 * @author Daniella
 */
public interface RepositorioLocMidia {
    
    
    /**
     * Insere LocMidia no bd
     * @param lm
     * @throws ConsultaException
     * @throws ConexaoException
     */
    public void inserir(LocMidia lm) throws ConsultaException,ConexaoException;
    
    /**
     * altera LocMidia no bd
     * @param lm
     * @throws ConsultaException
     * @throws ConexaoException
     */
    public void alterar(LocMidia lm) throws ConsultaException,ConexaoException;
    
    /**
     * exclui registro LocMidia do bd
     * @param lm
     * @throws ConsultaException
     * @throws ConexaoException
     */
    public void excluir(LocMidia lm) throws ConsultaException,ConexaoException;
    
    /**
     * Consulta registro LocMidia a partir do cod locacao
     * @param codLoc
     * @return LocMidia
     * @throws ConsultaException
     * @throws ConexaoException
     */
    public LocMidia consultarCodLoc(int codLoc) throws ConsultaException,ConexaoException;
    
    /**
     * Consulta registro LocMidia a partir do cod da mídia
     * @param codMidia
     * @return LocMidia
     * @throws ConsultaException
     * @throws ConexaoException
     */
    public LocMidia consultarCodMidia(int codMidia) throws ConsultaException,ConexaoException;
    
    /**
     * Lista registros das tabelas Cliente, Locacao, LocMidia, Midia, Filme e Categoria
     * @return ArrayList
     * @throws ConsultaException
     * @throws ConexaoException
     */
    public ArrayList<LocMidia> listar() throws ConsultaException,ConexaoException;
    
    
    /**
     * Lista registros da tabela LocMidia
     * @param codMidia
     * @return ArrayList
     * @throws ConsultaException
     * @throws ConexaoException
     */
    public ArrayList<LocMidia> listarCodMidia(int codMidia) throws ConsultaException,ConexaoException;
    
}
